import 'package:flutter/material.dart';
import '../models/post_model.dart';

class PostDetailScreen extends StatelessWidget{
  
  final Post post;
  const PostDetailScreen({super.key,required this.post});
  
  @override
  Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(title: Text(post.shortTitle),),
        body: Padding(
          padding: const EdgeInsets.all(16.0),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Text(post.title,style: Theme.of(context).textTheme.headlineMedium,),
              const SizedBox(height: 8,),
              Row(
                children: [
                  const Icon(Icons.access_time,size: 16,color: Colors.grey),
                  const SizedBox(width: 4),
                  // Text(
                  //   post.relativeTime,
                  //   style: const TextStyle(color: Colors.grey),
                  // ),
                  const SizedBox(width: 16),
                  const Icon(Icons.favorite,size: 16,color: Colors.grey),
                  const SizedBox(width: 4),
                  Text('${post.likeCount}',style: const TextStyle(color: Colors.grey),),
                ],
              ),
              const SizedBox(height: 16),
              Text(post.body)
            ],
          ),
        ),
      );
  }
}
